i=1
j=1
y=[]
while True:
    k=i+j
    if k %2 ==0:
        y.append(k)
    i=j
    j=k
    if k>=4000000:
        break
print sum(y)

